package com.nh.utils.http;

/**
 * 网络信息查询，包括：身份证信息查询、IP地址查询、手机号码归属地查询
 * @author tdw
 *
 */
public class Information {
 
 
 /**
  * 身份证信息查询
  * @param id
  * @return
  */
 public static String getPersonInfo(String id){
  String requestUrl = "http://www.yodao.com/smartresult-xml/search.s?type=id&q="+id;
  return HttpConnection.doPostRequest(requestUrl, "GBK");
  
 }
 
 
 /**
  * IP地址查询
  * @param ip
  * @return
  */
 public static String getIpInfo(String ip){
  String requestUrl="http://www.youdao.com/smartresult-xml/search.s?type=ip&q="+ip;
  return HttpConnection.doPostRequest(requestUrl, "GBK");
 }
 
 
 /**
  * 手机号码归属地查询
  * @param number
  * @return
  */
 public static String getMobileNumerInfo(String number){
  //String requestUrl="http://www.yodao.com/smartresult-xml/search.s?type=mobile&q="+number;
	 String requestUrl="http://www2.ct10000.com/cdma/index.jsp?webcode="+number;
  return HttpConnection.doPostRequest(requestUrl, "GBK");
 }
 
}